package com.siruier.boss.ui.dialog

import android.app.Dialog
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import com.siruier.boss.R
import com.siruier.boss.databinding.DialogPayAwaitBinding

class PayAwaitDialog(
    context: Context,
) : Dialog(context, R.style.dimLoadingdialog) {

    private val vb: DialogPayAwaitBinding = DialogPayAwaitBinding.inflate(LayoutInflater.from(context))

    init {
        setContentView(vb.root)
        setCancelable(false)
        vb.tvNegativeButton.setOnClickListener { dismiss() }
        vb.tvPositiveButton.setOnClickListener { dismiss() }

        val window = window
        val attributes = window!!.attributes
        attributes.width = (context.resources.displayMetrics.widthPixels * 0.868).toInt()
        attributes.height = ViewGroup.LayoutParams.WRAP_CONTENT
        window.attributes = attributes
    }
}